/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.guidance.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.guidance.entity.JpEvidence;
import com.jeeplus.modules.guidance.mapper.JpEvidenceMapper;

/**
 * 证据指引Service
 * @author 姜盼
 * @version 2020-09-16
 */
@Service
@Transactional(readOnly = true)
public class JpEvidenceService extends TreeService<JpEvidenceMapper, JpEvidence> {

	public JpEvidence get(String id) {
		return super.get(id);
	}
	
	public List<JpEvidence> findList(JpEvidence jpEvidence) {
		if (StringUtils.isNotBlank(jpEvidence.getParentIds())){
			jpEvidence.setParentIds(","+jpEvidence.getParentIds()+",");
		}
		return super.findList(jpEvidence);
	}
	
	@Transactional(readOnly = false)
	public void save(JpEvidence jpEvidence) {
		super.save(jpEvidence);
	}
	
	@Transactional(readOnly = false)
	public void delete(JpEvidence jpEvidence) {
		super.delete(jpEvidence);
	}
	
}